package com.lysj.admin.master.bussiness.company.company.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lysj.admin.master.common.enumeration.EnumInterface;
import com.lysj.admin.master.common.spring.mpbase.MyEntity;
import com.lysj.admin.master.common.validation.annotation.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author Created by drj on 2019-12-27 15:29
 * @description 雇佣员工表
 */
@Data
@Entity
@EqualsAndHashCode(callSuper = true)
@TableName("lysj_company_employee")
@Table(name = "lysj_company_employee")
public class Employee extends MyEntity {

    @Getter
    @AllArgsConstructor
    public enum IdCardConfirmStatus implements EnumInterface {
        REGISTER(1, "刚注册"),
        BINDPHONE(2, "绑定过手机号"),
        UNCERTIFY(3, "未认证"),
        SUCCESS(4, "认证成功");
        private Integer code;
        private String status;
    }


    private String idNum;//身份证
    private String phone;//手机
    private String idFacePhoto; //身份证正面照
    private String idBackPhoto; //身份证反面照
    private String signPhoto;//签名照片
    private String errorReason;//错误原因
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date signTime;//签约时间
    private Integer idCardConfirmStatus;//身份证认证状态
    private String openId;
	@Column(columnDefinition = "decimal(10,2)")
    private BigDecimal balance;//余额
}
